package com.cq.hd.member.controller;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.common.response.ResultGenerator;
import com.cq.hd.member.api.TbMerchantAmtBillApi;
import com.cq.hd.member.api.dto.AdminMerchantAmtBillPageDto;
import com.cq.hd.member.api.dto.MerchantAmtBillDto;
import com.cq.hd.member.api.vo.AdminMerchantAmtBillPageVo;
import com.cq.hd.member.api.vo.MerchantAmtBillVo;
import com.cq.hd.member.service.TbMerchantAmtBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商户资金流水表 前端控制器
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
@RestController
public class TbMerchantAmtBillController implements TbMerchantAmtBillApi {

    @Autowired
    private TbMerchantAmtBillService merchantAmtBillService;

    @Override
    public Result<List<MerchantAmtBillVo>> listMerchantAmtBill(MerchantAmtBillDto merchantAmtBillDto) {
        return ResultGenerator.success(merchantAmtBillService.listMerchantAmtBill(merchantAmtBillDto));
    }

    @Override
    public Result<Page<AdminMerchantAmtBillPageVo>> pageMerchantAmtBill(AdminMerchantAmtBillPageDto adminMerchantAmtBillPageDto) {
        return ResultGenerator.success(merchantAmtBillService.pageMerchantAmtBill(adminMerchantAmtBillPageDto));
    }
}
